package org.zpmis;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.FilterType;
import org.zpmis.configurer.DataSourceConfig;
import org.zpmis.configurer.MybatisConfigurer;
import org.zpmis.configurer.PackagesSqlSessionFactoryBean;
import org.zpmis.configurer.RedisConfigurer;

@SpringBootApplication(exclude= {DataSourceAutoConfiguration.class})
@ComponentScan(excludeFilters = {
        @ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE,classes = {
                DataSourceConfig.class,
                MybatisConfigurer.class,
                PackagesSqlSessionFactoryBean.class,
                RedisConfigurer.class})})
@EnableDiscoveryClient
public class FileServiceProviderApplication {

    final static Logger logger = LoggerFactory.getLogger(FileServiceProviderApplication.class);

    public static void main(String[] args) {
        SpringApplication.run(FileServiceProviderApplication.class, args);
        logger.info("图片服务已经启动！");
    }
}
